﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace C4F.DevKit.Bluetooth.ServiceAndDeviceDiscovery
{
    /// <summary>
    /// Represents the BTH_SET_SERVICE structure.
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public struct BthSetService
    {
        /// <summary>
        /// Represents the version of SDP
        /// </summary>
        public IntPtr SdpVersion;
        /// <summary>
        ///Represents the handle to the SDP record.
        /// </summary>
        public IntPtr RecordHandle;
        /// <summary>
        /// Represents the Class of device (COD) information.
        /// </summary>
        public System.UInt32 CodService;
        /// <summary>
        /// Reserved
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
        public System.UInt32[] Reserved;
        /// <summary>
        /// Represents the Size, in bytes, of pRecord.
        /// </summary>
        public System.UInt32 RecordLength;
        /// <summary>
        /// Represents the SDP record. Maximum size permitted is 126.
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 126)]
        public byte[] Record;

    }        
}
